package com.icode.core.dto.house;

import com.icode.core.model.house.HouseExtraFee;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-10-26
 * Time: 上午11:34
 * To change this template use File | Settings | File Templates.
 */
public class HouseExtraFeeDTO {

    private String guid;
    private String houseInfoGuid;
    private String title;
    private String price;

    public HouseExtraFeeDTO() {
    }

    public HouseExtraFeeDTO(String guid, String houseInfoGuid, String title, String price) {
        this.guid = guid;
        this.houseInfoGuid = houseInfoGuid;
        this.title = title;
        this.price = price;
    }

    public static HouseExtraFeeDTO toDTO(HouseExtraFee houseExtraFee) {
        return new HouseExtraFeeDTO(houseExtraFee.guid(), houseExtraFee.houseInfo().guid(), houseExtraFee.title(), houseExtraFee.price());
    }

    public static List<HouseExtraFeeDTO> toDTOs(List<HouseExtraFee> houseExtraFees) {
        List<HouseExtraFeeDTO> houseExtraFeeDTOs = new ArrayList<>();
        for (HouseExtraFee h : houseExtraFees) {
            houseExtraFeeDTOs.add(toDTO(h));
        }
        return houseExtraFeeDTOs;
    }

    public String getGuid() {
        return guid;
    }

    public void setGuid(String guid) {
        this.guid = guid;
    }

    public String getHouseInfoGuid() {
        return houseInfoGuid;
    }

    public void setHouseInfoGuid(String houseInfoGuid) {
        this.houseInfoGuid = houseInfoGuid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }
}
